
 <ion-view title="选择调货商品">
	<ion-header-bar class="bar bar-royal bar-header inter-head">
		<div class="col col-fixed text-center">
			<span class="col-item icon-label ion-navicon" ng-click="toggleCat()">分类</span>
		</div>
		<div class="col text-right" text-filter>
			<span class="col-item" ng-click="toggleFilter()">
				<span class="pull-left">全部商品</span>
				<i class="ion-funnel icon-right"></i>
			</span>
		</div>
	    <div class="buttons">
	      <button class="button button-icon button-close ion-ios-close-empty" ng-click="productsModal.hide()"></button>
	    </div>
    </ion-header-bar>

	<ion-scroll direction="y" class="sidebar has-header has-footer-large" ng-if="showCat">
	    <ion-list>
	        <ion-item ng-click="setFilter('')" class="">全部</ion-item>
	        <ion-item ng-repeat="(label,brand) in brandList" ng-click="setFilter(label)">
	        	{{label}}
	        	<span class="badge badge-light" ng-if="brand<=99">{{brand}}</span>
	        	<span class="badge badge-light" ng-if="brand>99">99+</span>
	        </ion-item>
	    </ion-list>
	</ion-scroll>

	<ion-content class="has-header has-footer-large">

		<div class="list accordion-list product-select-list">
			<div ng-repeat="product in products | filter:filter | orderBy:order" class="item item-thumbnail-left item-checkbox">
				<div class="row">
					<img ng-src="{{product.thumb}}" class="item-image"/>
					<div class="col">
						<h2 class="title">{{product.properties.brand.value + product.properties.model.value}}</h2>
						<div class="prop-list">
							<p ng-repeat="property in product.properties" class="prop-item" ng-if="property.name!='品牌' && property.name!='型号'">
								<span class="prop-label">{{property.name}}:</span>
								<span class="prop-value">{{property.value}}</span>
							</p>
							<p class="prop-item">库存：10{{ property.count }}部</p>
						</div>
						<label class="checkbox">
					       <input type="checkbox" ng-click="selectProduct(product)">
					    </label>
					</div>
					<div class="accordion-handle arrow right-bottom-arrow" ng-class="{on: isItemShown(product)}" ng-click="toggleItem(product)" ng-if="order.list.indexOf(product)>-1">
						<span class="item-count text-center padding assertive">{{product.count}}</span>
					</div>
				</div>

			</div>
		</div>
	</ion-content>

	<div class="bar bar-footer has-footer bar-balanced" ng-if="selectedProducts.length>0">
        <a class="title ng-binding" ng-click="save();" href="#/query-result">
            查询{{selectedProducts.length}}款
        </a>
    </div>

</ion-view>
